-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename teal_data_module.R functions #1430
Conversation
Renaming I can rename the external function parameter to match the new one but this will require renaming multiple packages and modules (notably the new I could also duplicate the documentation on the internal function Renaming {ui,srv}_teal_data to {ui,srv}_teal_data_module was made via an alias, so I don't expect any function to break due to this change. But it might be worth to check how this renaming would affect teal Pushing to see checks results but I expect them to fail, as the path I took was to rename the parameter name but haven't changed anything related to it on tests (or dependencies). |
…com/insightsengineering/teal into 1323_renames_teal_data_modules@main
… & srv_teal_data_module
Code Coverage Summary
Diff against main
Results for commit: 9d2e771 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Unit Tests Summary 1 files 27 suites 10m 27s ⏱️ Results for commit 9d2e771. ♻️ This comment has been updated with latest results. |
Unit Test Performance Difference
Additional test case details
Results for commit 4bb3811 ♻️ This comment has been updated with latest results. |
…com/insightsengineering/teal into 1323_renames_teal_data_modules@main
Please do! |
Renaming is done selectively, there are bunch of functions which still haven't been touch. This is a diagram of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check these functions:
- In
.call_teal_module
:filtered_teal_data
->data
and setcheckmate::assert_class(data, "teal_data")
- in
srv_data_summary
:teal_data
->data
…eal_data_modules@main
As discussed on the SU, I renamed parameters back to data (on this PR the different commits replaced like this: data -> teal_data_r -> data), and renamed The data parameter may refer to different classes, but developers should rely on the assertions to know which class is accepted instead of the name. @gogonzo setting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gogonzo setting checkmate::assert_class(data, "teal_data") inside .call_tea_module caused more than 50 test failures. I'm replacing the assertion with "reactives" as this is what it seems to be expected on tests.
Yup, I'm glad you've figured it out. I have no further comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Pull Request
srv_teal_data()
&ui_teal_data()
: renamed tosrv_teal_data_module()
&ui_teal_data_module()
.srv_teal_data_module()
:data
toteal_data_r
(teal_data
reactive ): This suffix is what is used inside tmc and tmg modules.data_module
toteal_data_module
.data_out
intomodule_out
(to keep it separate fromdata
but close toteal_data_module
)srv_validate_reactive_teal_data()
: renamedata
argument intoteal_data_r
to match previous renaming and schema in the framework.srv_validate_reactive_teal_data()
: The tryCatch code moved tosrv_teal_data_module
and as the code checked ismodule_out
I renamed the output totry_module_out
..fallback_on_failure()
: There is no longer.fallback_on_failure()
.Fixes #1323
Due to the renaming I had to change some tests.
I checked interactively the examples with
devtools::run_examples()
as well as with R CMD check. I'm not sure whether this PR broke the examples on ?teal::teal_slices
. This is an internal function with some examples that only display the ID, and report there is no matching id.